
package com.intretech.umsin.oss.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.intretech.umsin.common.excel.converter.LocalDateTimeConverter;
import com.intretech.umsin.datasource.codemapping.entity.Assignment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
* @version V1.0
* 文件信息:file_info 对应的VO模型类.
* @ClassName: FileInfoVo
* @Description: 文件信息:file_info 对应的VO模型类.
* @author: 李启联
* @date:   2022-6-16 11:22:37
* @Copyright: Copyright (c) 2022
*/
@ApiModel("文件信息")
@ExcelIgnoreUnannotated
public class FileInfoVo implements Assignment, Serializable {

    // 主键id
    @ApiModelProperty(value = "主键id" ,dataType="bigint(19)" ,required= true)
    @ExcelProperty(value = "主键id",converter = LocalDateTimeConverter.class)
    private Long id;

    // 按照一定规则算出对应文件的md5值,用于业务判定是否为同一文件
    @ApiModelProperty(value = "按照一定规则算出对应文件的md5值,用于业务判定是否为同一文件" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "按照一定规则算出对应文件的md5值,用于业务判定是否为同一文件",converter = LocalDateTimeConverter.class)
    private String fileMd5;

    // 文件名称
    @ApiModelProperty(value = "文件名称" ,dataType="varchar(128)" ,required= false)
    @ExcelProperty(value = "文件名称",converter = LocalDateTimeConverter.class)
    private String name;

    // 是否为图片
    @ApiModelProperty(value = "是否为图片" ,dataType="tinyint(3)" ,required= false)
    @ExcelProperty(value = "是否为图片",converter = LocalDateTimeConverter.class)
    private Integer isImg;

    // 内容类型
    @ApiModelProperty(value = "内容类型" ,dataType="varchar(128)" ,required= false)
    @ExcelProperty(value = "内容类型",converter = LocalDateTimeConverter.class)
    private String contentType;

    // 文件大小
    @ApiModelProperty(value = "文件大小" ,dataType="bigint(19)" ,required= false)
    @ExcelProperty(value = "文件大小",converter = LocalDateTimeConverter.class)
    private Long size;

    // 文件类型
    @ApiModelProperty(value = "文件类型" ,dataType="varchar(32)" ,required= false)
    @ExcelProperty(value = "文件类型",converter = LocalDateTimeConverter.class)
    private String fileType;

    // 物理路径
    @ApiModelProperty(value = "物理路径" ,dataType="varchar(255)" ,required= false)
    @ExcelProperty(value = "物理路径",converter = LocalDateTimeConverter.class)
    private String path;

    // 外部访问路径
    @ApiModelProperty(value = "外部访问路径" ,dataType="varchar(1,024)" ,required= false)
    @ExcelProperty(value = "外部访问路径",converter = LocalDateTimeConverter.class)
    private String url;

    // 文件来源
    @ApiModelProperty(value = "文件来源" ,dataType="varchar(32)" ,required= false)
    @ExcelProperty(value = "文件来源",converter = LocalDateTimeConverter.class)
    private String source;

    // 业务关联ID
    @ApiModelProperty(value = "业务关联ID" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "业务关联ID",converter = LocalDateTimeConverter.class)
    private String businessId;

    // 用户自定义
    @ApiModelProperty(value = "用户自定义" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "用户自定义",converter = LocalDateTimeConverter.class)
    private String userDefine;

    // 目标存储名称
    @ApiModelProperty(value = "目标存储名称" ,dataType="varchar(128)" ,required= false)
    @ExcelProperty(value = "目标存储名称",converter = LocalDateTimeConverter.class)
    private String tagsName;

    // 版本号
    @ApiModelProperty(value = "版本号" ,dataType="int(10)" ,required= false)
    @ExcelProperty(value = "版本号",converter = LocalDateTimeConverter.class)
    private Integer version;

    // 租户ID
    @ApiModelProperty(value = "租户ID" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "租户ID",converter = LocalDateTimeConverter.class)
    private String tenantId;

    // 创建人
    @ApiModelProperty(value = "创建人" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "创建人",converter = LocalDateTimeConverter.class)
    private String creator;

    // 修改人
    @ApiModelProperty(value = "修改人" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "修改人",converter = LocalDateTimeConverter.class)
    private String modifier;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 创建时间
    @ApiModelProperty(value = "创建时间" ,dataType="datetime()" ,required= false)
    @ExcelProperty(value = "创建时间",converter = LocalDateTimeConverter.class)
    private java.time.LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 修改时间
    @ApiModelProperty(value = "修改时间" ,dataType="datetime()" ,required= false)
    @ExcelProperty(value = "修改时间",converter = LocalDateTimeConverter.class)
    private java.time.LocalDateTime modifyTime;


    private String filePathPrefix;

    public String getFilePathPrefix() {
        return filePathPrefix;
    }

    public void setFilePathPrefix(String filePathPrefix) {
        this.filePathPrefix = filePathPrefix;
    }

    public Long getId(){
    return this.id;
    }

    public void setId(Long id){
    this.id = id;
    }
    public String getFileMd5(){
    return this.fileMd5;
    }

    public void setFileMd5(String fileMd5){
    this.fileMd5 = fileMd5;
    }
    public String getName(){
    return this.name;
    }

    public void setName(String name){
    this.name = name;
    }
    public Integer getIsImg(){
    return this.isImg;
    }

    public void setIsImg(Integer isImg){
    this.isImg = isImg;
    }
    public String getContentType(){
    return this.contentType;
    }

    public void setContentType(String contentType){
    this.contentType = contentType;
    }
    public Long getSize(){
    return this.size;
    }

    public void setSize(Long size){
    this.size = size;
    }
    public String getFileType(){
    return this.fileType;
    }

    public void setFileType(String fileType){
    this.fileType = fileType;
    }
    public String getPath(){
    return this.path;
    }

    public void setPath(String path){
    this.path = path;
    }
    public String getUrl(){
    return this.url;
    }

    public void setUrl(String url){
    this.url = url;
    }
    public String getSource(){
    return this.source;
    }

    public void setSource(String source){
    this.source = source;
    }
    public String getBusinessId(){
    return this.businessId;
    }

    public void setBusinessId(String businessId){
    this.businessId = businessId;
    }
    public String getUserDefine(){
    return this.userDefine;
    }

    public void setUserDefine(String userDefine){
    this.userDefine = userDefine;
    }
    public String getTagsName(){
    return this.tagsName;
    }

    public void setTagsName(String tagsName){
    this.tagsName = tagsName;
    }
    public Integer getVersion(){
    return this.version;
    }

    public void setVersion(Integer version){
    this.version = version;
    }
    public String getTenantId(){
    return this.tenantId;
    }

    public void setTenantId(String tenantId){
    this.tenantId = tenantId;
    }
    public String getCreator(){
    return this.creator;
    }

    public void setCreator(String creator){
    this.creator = creator;
    }
    public String getModifier(){
    return this.modifier;
    }

    public void setModifier(String modifier){
    this.modifier = modifier;
    }
    public java.time.LocalDateTime getCreateTime(){
    return this.createTime;
    }

    public void setCreateTime(java.time.LocalDateTime createTime){
    this.createTime = createTime;
    }
    public java.time.LocalDateTime getModifyTime(){
    return this.modifyTime;
    }

    public void setModifyTime(java.time.LocalDateTime modifyTime){
    this.modifyTime = modifyTime;
    }

    public FileInfoVo(){
    }

    @Override
    public String toString() {
        return "FileInfoVo{" +
                "id=" + id +
                ", fileMd5='" + fileMd5 + '\'' +
                ", name='" + name + '\'' +
                ", isImg=" + isImg +
                ", contentType='" + contentType + '\'' +
                ", size=" + size +
                ", fileType='" + fileType + '\'' +
                ", path='" + path + '\'' +
                ", url='" + url + '\'' +
                ", source='" + source + '\'' +
                ", businessId='" + businessId + '\'' +
                ", userDefine='" + userDefine + '\'' +
                ", tagsName='" + tagsName + '\'' +
                ", version=" + version +
                ", tenantId='" + tenantId + '\'' +
                ", creator='" + creator + '\'' +
                ", modifier='" + modifier + '\'' +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                ", filePathPrefix='" + filePathPrefix + '\'' +
                '}';
    }
}